package com.tian.system.service.impl;

import java.util.List;

import com.tian.common.utils.typecast.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tian.system.mapper.NotedirMapper;
import com.tian.system.domain.Notedir;
import com.tian.system.service.INotedirService;

/**
 * 笔记目录 服务层实现
 *
 * @author zcx
 * @date 2020-01-04 17:09:13
 */
@Service
public class NotedirServiceImpl implements INotedirService {
	@Autowired
	private NotedirMapper notedirMapper;

	/**
     * 查询笔记目录信息
     *
     * @param id 笔记目录ID
     * @return 笔记目录信息
     */
    @Override
	public Notedir selectNotedirById(long id) {
	    return notedirMapper.selectNotedirById(id);
	}

	/**
     * 查询笔记目录列表
     *
     * @param notedir 笔记目录信息
     * @return 笔记目录集合
     */
	@Override
	public List<Notedir> selectNotedirList(Notedir notedir) {
	    return notedirMapper.selectNotedirList(notedir);
	}

    /**
     * 新增笔记目录
     *
     * @param notedir 笔记目录信息
     * @return 结果
     */
	@Override
	public int insertNotedir(Notedir notedir) {
	    return notedirMapper.insertNotedir(notedir);
	}

	/**
     * 修改笔记目录
     *
     * @param notedir 笔记目录信息
     * @return 结果
     */
	@Override
	public int updateNotedir(Notedir notedir) {
	    return notedirMapper.updateNotedir(notedir);
	}

	/**
     * 删除笔记目录对象
     *
     * @param id 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteNotedirById(long id) {
		return notedirMapper.deleteNotedirById(id);
	}

	/**
     * 删除笔记目录对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteNotedirByIds(String ids) {
		return notedirMapper.deleteNotedirByIds(Convert.toStrArray(ids));
	}

}
